Error correction code striping

ABSTRACT

A method is disclosed which decreases the amount of error correction code data required to detect and correct errors in digital data while still maintaining a specified ability to correct errors in large groups of contiguous data. The present invention accomplishes this by placing distance either in space or in time between bytes grouped mathematically for error correction code calculations. An error affecting contiguous bytes, like scratches or other defects in digital storage media, or certain types of interference in either wired or wireless digital communications, would affect many error correction code groups, but would only affect one byte from each group. The error can easily be corrected using only a one dimensional error correction code, removing the need for a two dimensional product error correction code and the additional data overhead that the column ECC data necessarily adds to the block.

BACKGROUND OF THE INVENTION

The invention relates to the field of error correction codes, and in particular to applications traditionally requiring product error correction codes.

An error correction code (ECC) assists in locating errors in digital data, and allows a predetermined number of errors to be corrected. The ability to detect and correct errors is accomplished by adding redundant information to the data according to a specific algorithm. Each bit of redundant information is generated based on many of the original data bits.

Block error correction codes are used for fixed-size blocks of data. Examples of block error correction codes include Reed-Solomon, Golay, and Hamming codes. Block codes are widely used to protect the accuracy of data stored on digital storage media, or transmitted digitally.

In error correction coding, each block of data is organized into rows and columns. In order to increase the number and range of possible errors that can be corrected by the ECC scheme in a block of data, error correction data is often calculated both for each row and for each column of data in the block. This method of using both row and column error correction codes in a single block of data is referred to as a product code or a two dimensional block error correction code. The increase in ability to correct errors using a product code also introduces an increase in the amount of redundant information added to the data since ECC data must be added for both rows and columns. This increase in the amount of error correction data in turn decreases the amount of original user data that can be stored or transmitted.

As illustrated in FIG. 1, user data 30, protected by a product code ECC scheme, is organized into rows and columns (see rows 1- U and columns 1-V). Each column is typically one byte of data. It should be noted that user data itself may already include some type of error correction or error detection code such as a cyclic redundancy check (CRC). ECC data is calculated for each row of user data according to the ECC scheme employed, which may be Reed-Solomon, Golay, Hamming, or any other block ECC. This data is then appended to the end of each row. Additional ECC data is also calculated for each column, and placed at the bottom of each column. Row ECC data is also calculated for each row of column ECC data, and appended to the end of these rows. This entire block, including both user and ECC data, can then be stored or transmitted. The bytes are typically stored or transmitted beginning with the byte occupying row 1 (20), column 1 (10), followed by the remaining bytes in row 1 (20), proceeding towards column V (12). Each row is then stored or transmitted in a similar order, proceeding towards row X (24) until the entire block has been completed.

Some errors can be corrected using only the row ECC data, but if an individual row contains too many errors for the respective row ECC scheme to correct, then the column ECC data must also be used to correct the errors. This means that in most cases the entire block is accessed whenever any of the user data is accessed.

Many applications frequently involve errors that require both the row and column ECC data to correct. Errors due to scratches or other defects in digital storage media, or due to certain types of interference in either wired or wireless digital communications are more likely to occur in groups than individually. Although using a product code as described can correct a large amount of contiguous errors, a significant overhead of additional ECC data is introduced by the scheme. This data overhead decreases the actual user data storage capacity or throughput and increases the overall complexity of the system.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a product code error correction scheme.

FIG. 2 shows a first embodiment of the present invention.

FIG. 3 shows a second embodiment of the present invention.

FIG. 4 shows an embodiment of an encoding portion of the present invention.

FIG. 5 shows an embodiment of a decoding portion of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The present invention decreases the amount of ECC data required to detect and correct errors in digital data while still maintaining a specified ability to correct errors in large groups of contiguous data. The present invention accomplishes this by placing distance either in space or in time between related bytes. Related bytes are bytes that are grouped together mathematically for ECC calculations. An error affecting contiguous bytes, like scratches or other defects in digital storage media, or certain types of interference in either wired or wireless digital communications, would affect many ECC groups, but would only affect one byte from each group. Because only one byte from each group is affected, the error can easily be corrected using a one dimensional ECC, removing the need for the two dimensional product code ECC and its data overhead. As can be seen in FIG. 2 in a first embodiment of the present invention, the user data, which may include a CRC or other error detection or correction data, is organized into rows and columns. Each column may be one byte, or any other fixed amount of data. ECC data is calculated for each row of user data according to the ECC scheme employed, which may be Reed-Solomon, Golay, Hamming, or any other block ECC. The calculated ECC data for each row is then appended to the row. No column ECC data is calculated or used. An ECC scheme where each data symbol is included in only one ECC calculation is referred to as a one dimensional ECC scheme.

The block of data is then written to the digital storage media or transmitted. The first byte to be written or transmitted is again the byte occupying row 1 (120), column 1 (110). Instead of proceeding along row 1 (120), the next byte written or transmitted is the byte occupying row 2 (124), column 1 (110). Each byte in column 1 (110) is then stored or transmitted, ending with the byte occupying row U (122) column 1 (110). Once column 1 (110) has been stored or transmitted, column 2 (116) is then transmitted, beginning with the byte occupying row 2 (124), column 1 (110), and proceeding to the byte occupying row U (122) column 2 (116). Each column is stored or transmitted, proceeding in order toward column Y (114) until the entire block, including column Y (114) has been stored or transmitted. This includes row ECC data 140, which is stored or transmitted by column in the same manner as user data 130. Prior to storage or transmission, the data may first be copied to a memory buffer in this new ECC striped order to facilitate the storing or transmitting step.

Because of the ECC striping, meaning the out of order column by column manner in which the data is stored or transmitted, the entire data block must be read or received in order to use the data in its original order, or to correct the data with the row ECC which is stored or transmitted last. The effect is the same as if row and column ECC data were produced using the product code scheme—an entire block of data must be read or received rather than an individual row of data.

Notice that because of the ECC striping, even if an entire column is lost to contiguous errors, only one byte from each ECC group is lost, and can easily be corrected. The correction ability of the ECC scheme employed should be chosen based upon the number and type of errors expected.

FIG. 3 shows a second embodiment of the present invention comprising a specific implementation for explanation purposes. Note that specific rows and columns and bytes are used for explanation, but any number of implementations will fit within the scope of the present invention. A block of user data 230 has 64 rows. Each row contains 512 bytes of user data, and a 4 byte CRC 232. Appended to each row of user data is an 88 byte Reed-Solomon ECC field 240, computed over the row. This is a total of 38,656 bytes in the block, including both the user data 230 and the ECC data 240. If a product code ECC scheme had been used, and a 7 byte column ECC calculated and appended to each column, the total would be 42,884 bytes. The present invention results in a block size decrease of 4,228 bytes, or nearly ten percent, without a decrease in user data, while preserving the ability to correct errors in large groups of contiguous data.

An embodiment of the process flow of an encoder stage of the present invention is illustrated in FIG. 4. In FIG. 4 user data from host 460 is written to buffer memory 450. Host 460 may be any device utilizing the present invention, including electronic devices involved in data communication or storage. It should be noted that the user data may have already been processed by other systems, including other ECC systems, before being written to buffer memory 450. The user data is then sent from buffer memory 450 to both striping buffer 430 and to ECC data generator 440. Row ECC data is calculated by ECC data generator 440 according to the ECC scheme employed (eg. Reed-Solomon, Golay, Hamming). The row ECC data is then sent to striping buffer 430 for inclusion in the data block at the end of the user data according to the present invention. The entire data block, including both user data and ECC row data, is then sent from striping buffer 430 to modulator 410 in striped column by column order according to the present invention to be modulated and written to channel 410. Although a single striping buffer 430 may be used, using multiple striping buffers, 430 and 431, allows data to be read into one of the striping buffers, 430 or 431, from buffer memory 450 while data is being written to modulator 420 from the other striping buffer, 430 or 431. If multiple striping buffers are used, they will alternate tasks. This increases encoding speed and data throughput. Channel 410 may be the write channel of a data storage system, a communications channel, or any other medium.

FIG. 5 shows an embodiment of the decoder stage of the present invention. Channel modulated data that has been encoded according to the present invention is first read from channel 410 and demodulated by demodulator 520. The data read from channel 410 may contain errors introduced by channel 410, and is still in ECC striped order. Next the data is written to striping buffer 530 by column, which returns the data to its original order. The data is then sent, in its original order but still containing possible errors, to the ECC decoder and data corrector 540. ECC decoder and data corrector 540 will decode the row ECC data according to the ECC scheme employed (as explained earlier) and use the ECC data to correct any errors introduced into the data by the channel 410. The data in striping buffer 530 is then modified to include the corrections made by ECC decoder and data corrector 540. Once all modifications have been made, the corrected data can be written to buffer memory 550 and then sent to host 560. Again, while only one striping buffer 530 is necessary for decoding, if multiple striping buffers 530 and 531 are used, data can be written to one of the striping buffers, 530 or 531, from demodulator 520 while corrected data is being written to buffer memory 550 from the other striping buffer, 530 or 531, thereby increasing decoding speed and data throughput. If an ECC scheme was chosen that has the ability to correct all of the errors introduced by the channel, the user data will be identical to the original user data that was encoded and written to the channel. If a CRC or any other information or processing was added to the user data prior to encoding, the data may be sent to other systems before being sent to host 560.

It should be noted that in applications where data is not read and written simultaneously, buffer memory 450 and striping buffers 430 and 431 from the encoder in FIG. 4 may also be used for buffer memory 550 and striping buffers 530 and 531 from the decoder in FIG. 5. Host 560 from FIG. 5 may also be the same device as host 460 from FIG. 4, or a second device which also has access to channel 410.

Although the description of the present invention has utilized various embodiments, it will be recognized that the present invention is not limited to the specific embodiments described. Rather, the present invention encompasses all variants incorporating the essence of the ideas presented in the above description. 

1. A method comprising: receiving user data in a first ordered manner; organizing said user data into rows and columns; calculating ECC data for each of said rows; appending said ECC data to each of said rows wherein the ECC data calculated for a given of said rows is appended to that specific given of said rows; and sending combined user data and ECC data in a second ordered manner.
 2. The method of claim 1, wherein receiving user data comprises receiving user data having an initial set of ECC data included therein.
 3. The method of claim 1 wherein the step of sending combined user data and ECC data comprises sending combined user data and ECC data column by column.
 4. An encoder comprising: a memory receiving sets of data in a first ordered manner, the memory storing the sets of data in rows and columns wherein each of the sets of data is stored in a different one of the rows from the other of the sets of data; an ECC data generator coupled to the memory, the ECC data generator generating ECC data for each of the sets of data in each of the rows and appending the generated ECC data to the set of data for its respective row; and a device coupled to the memory, the device extracting the combined sets of data and ECC data in a second ordered manner.
 5. The encoder of claim 4 wherein the device extracts the combined sets of data and ECC data column by column.
 6. The encoder of claim 4, wherein the device coupled to the memory consists of a modulator which modulates the combined sets of data and ECC data for a specific channel.
 7. The encoder of claim 4, wherein each set of data has an initial set of ECC data included therein.
 8. The encoder of claim 4, wherein the memory is also part of a decoder.
 9. A decoder comprising: a first device extracting data encoded in a first ordered manner; a memory coupled to the first device receiving the encoded data, the memory storing the data in rows and columns in a second ordered manner such that each of the rows contain a set of data and ECC data calculated for the set of data; an ECC decoder and data corrector coupled to the memory, the ECC decoder and data corrector receiving the data from the memory in the second ordered manner, using the ECC data to correct errors in the set of data, and sending the error corrections to the memory; and a second device coupled to the memory, the second device extracting the sets of data in the second ordered manner.
 10. The decoder of claim 9, wherein the first ordered manner is column by column.
 11. The decoder of claim 9, wherein the first device is a demodulator which demodulates the data from a specific channel.
 12. The decoder of claim 9, wherein each set of data has an initial set of ECC data included therein.
 13. The decoder of claim 9, wherein the memory is also part of an encoder circuit. 